package com.example.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Auther: LIJingQi
 * @Description: 用户服务
 * @Date: 2023/3/30 23:37
 */
@Component
public class UserService {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Autowired
    PlatformTransactionManager platformTransactionManager;

//    @Transactional()
    public void transefor(){
        jdbcTemplate.update("update user set name=? where age =?;","llllllllllll",18);
//        int i=1/0;
    }
}
